<include file="public@header"/>


<script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
     
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" />

</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInUp js-check-wrap">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>行情市场列表</h5>
                        <div class="ibox-tools">
                            <a href="#" class="btn btn-primary btn-xs active">行情市场列表</a>
                            <a href="{:url('Ticker/add')}" class="btn btn-primary btn-xs">添加行情</a>
                        </div>
                    </div>
<div class="ibox-content">
    <form class="js-ajax-form" action="{:url('Ticker/listorderss')}" method="post">
        <div class="table-actions">
            <button class="btn btn-primary btn-small js-ajax-submit" type="submit">排序</button>
        </div>
    <table class="table table-hover" id="menus-table">
        <thead>
            <tr><th>排序</th>
                <th width="60">ID</th>
                <th>交易所名字</th>
                <th>交易所采集类</th>
                <th>市场名称</th>
                <th>币种</th>
                <th>货币</th>
                <th>交易量</th>
                <th>价格</th>
                <th>涨幅</th>
                <th>更新时间</th>
                <th>是否默认显示</th>
               
                <th width="150">操作</th>
            </tr>
        </thead>
        <tbody>
            <eq name="datas" value="">
                    <tr> 
                        <td colspan="5" style="text-align: center">暂无数据</td>
                    </tr>
            <else />
                <foreach name="datas" item="vo">
                    <tr>
                        <td style='padding-left:20px;'>
                            <input name='sort[{$vo.id}]' type='text' size='3' value='{$vo.sort}' class='input input-order'>
                        </td>
                        <td>{$vo.id} </td>
                     
                        <td>{$vo.exchange_name} </td>
                        <td>{$vo.exchange_class} </td>
                        <td>{$vo.market} </td>
                        <td>{$vo.coin} </td>
                        <td>{$vo.currency}</td>
                        <td>{$vo.volume}</td>
                        <td>{$vo.price}</td>
                        <td>{$vo.change}</td>
                      
                        <td>{$vo.update_time|date="Y-m-d H:i",###}</td>
                        <td>
                            <eq name="vo.default" value="1">
                                <span class="label label-info" onclick="checktag('{$vo.id}','default','0')">默认</span>&nbsp;&nbsp;&nbsp;
                            <else />
                                <span class="label label-default" onclick="checktag('{$vo.id}','default','1')">设置默认</span>&nbsp;&nbsp;&nbsp;
                            </eq>
                        </td>
                        <td>
                                <a href="{:url('Ticker/edit',['id'=> $vo.id  ]  )}">修改</a> | 
                                <a href="{:url('Ticker/del',['id'=> $vo.id  ]  )}" class="js-ajax-delete">删除</a>
                        </td>
                        <td>
                            
                        </td>
                    </tr>
                </foreach>
        </eq>
        </tbody>
    </table>


    
    <div class="pagination">
            <div>
                当前共有数据 <span style="color:blue;font-weight:bold">{$num}</span> 条
            </div>
            {$page|default=''}
        
    </div>
</div>

                    </div>
                </div>
        </div>
    </div>
<script src="__STATIC__/js/admin.js"></script>
<script>
        function checktag(id,tag,type){
            $.ajax({
                url:"{:url('Ticker/uptag')}",
                type:"post",
                data:{id:id,tag:tag,type:type},
                success:function(data){
                   
                        $('.tips').text(data).fadeIn().delay(1500).fadeOut();	
                        document.location.reload();
                    
                   
                }
            })
        }
    </script>
</body>
</html>